﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Threading;
using CodeCounsel.SharePoint.RibbonDesigner.ViewModel;

namespace CodeCounsel.SharePoint.RibbonDesigner.View
{
    public partial class MainView : UserControl
    {
        public MainView(MasterViewModel viewModel)
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(MainView_Loaded);
            DataContext = viewModel;
        }

        void MainView_Loaded(object sender, RoutedEventArgs e)
        {
            SynchronizationContext context = SynchronizationContext.Current;
            if (context == null)
            {
                context = new SynchronizationContext();
                SynchronizationContext.SetSynchronizationContext(context);
            }
        }
    }
}
